5. Interfaces¶
5.1. Notification¶
See Notification for the technical details of this interface.
The subscription & notification process is managed by a middleware and is described in the following diagram:
5.1.1. Services¶
-
subscribe
(topic, URL) Subscribe a URL to receive notifications sent to one topic
Parameters: - topic (str) – Topic
- URL (str) – URL to be called when a notification is available
Returns: a subscription ID
This service is synchronous.
-
unsubscribe
(id) Unsubscribe a URL from the list of receiver for one topic
Parameters: id (str) – Subscription ID Returns: bool
This service is synchronous.
-
confirm
(token) Confirm that the URL used during the subscription is valid
Parameters: token (str) – A token send through the URL. Returns: bool
This service is synchronous.
-
publish
(topic, subject, message) Notify of a new event all systems that subscribed to this topic
Parameters: - topic (str) – Topic
- subject (str) – The subject of the message
- message (str) – The message itself (a string buffer)
Returns: N/A
This service is asynchronous (systems that subscribed on this topic are notified asynchronously).
5.1.2. Dictionaries¶
As an example, below there is a list of events that each component might handle.
Event Type | Emitted by CR | Emitted by PR |
---|---|---|
Live birth | ✔ | |
Death | ✔ | |
Fœtal Death | ✔ | |
Marriage | ✔ | |
Divorce | ✔ | |
Annulment | ✔ | |
Separation, judicial | ✔ | |
Adoption | ✔ | |
Legitimation | ✔ | |
Recognition | ✔ | |
Change of name | ✔ | |
Change of gender | ✔ | |
New person | ✔ | |
Duplicate person | ✔ | ✔ |
5.2. Data Access¶
See Data Access for the technical details of this interface.
5.2.1. Services¶
-
getPersonAttributes
(UIN, names) Retrieve person attributes.
Authorization: To be defined
Parameters: - UIN (str) – The person’s UIN
- names (list[str]) – The names of the attributes requested
Returns: a list of pair (name,value). In case of error (unknown attributes, unauthorized access, etc.) the value is replaced with an error
This service is synchronous. It can be used to retrieve attributes from CR or from PR.
-
matchPersonAttributes
(UIN, attributes) Match person attributes. This service is used to check the value of attributes without exposing private data
Authorization: To be defined
Parameters: - UIN (str) – The person’s UIN
- attributes (list[(str,str)]) – The attributes to match. Each attribute is described with its name and the expected value
Returns: If all attributes match, a Yes is returned. If one attribute does not match, a No is returned along with a list of (name,reason) for each non-matching attribute.
This service is synchronous. It can be used to match attributes in CR or in PR.
-
verifyPersonAttributes
(UIN, expressions) Evaluate expressions on person attributes. This service is used to evaluate simple expressions on person’s attributes without exposing private data
Authorization: To be defined
Parameters: - UIN (str) – The person’s UIN
- expressions (list[(str,str,str)]) – The expressions to evaluate. Each expression is described with the attribute’s name, the operator (one of
<
,>
,=
,>=
,<=
) and the attribute value
Returns: A Yes if all expressions are true, a No if one expression is false, a Unknown if To be defined
This service is synchronous. It can be used to verify attributes in CR or in PR.
-
getPersonUIN
(attributes) Retrieve UIN based on a set of attributes. This service is used when the UIN is unknown.
Authorization: To be defined
Parameters: attributes (list[(str,str)]) – The attributes to be used to find UIN. Each attribute is described with its name and its value Returns: a list of matching UIN
This service is synchronous. It can be used to get the UIN of a person.
-
getDocument
(UINs, documentType, format) Retrieve in a selected format (PDF, image, …) a document such as a marriage certificate.
Authorization: To be defined
Parameters: - UIN (list[str]) – The list of UINs for the persons concerned by the document
- documentType (str) – The type of document (birth certificate, etc.)
- format (str) – The format of the returned/requested document
Returns: The list of the requested documents
This service is synchronous. It can be used to get the documents for a person.
5.2.2. Dictionaries¶
As an example, below there is a list of attributes/documents that each component might handle.
Attribute Name | In CR | In PR | Description |
---|---|---|---|
UIN | ✔ | ✔ | |
first name | ✔ | ✔ | |
last name | ✔ | ✔ | |
spouse name | ✔ | ✔ | |
date of birth | ✔ | ✔ | |
place of birth | ✔ | ✔ | |
gender | ✔ | ✔ | |
date of death | ✔ | ✔ | |
place of death | ✔ | ||
reason of death | ✔ | ||
status | ✔ | Example: missing, wanted, dead, etc. |
Attribute Name | In CR | In PR | Description |
---|---|---|---|
officer name | ✔ | ||
number | ✔ | ||
date | ✔ | ||
place | ✔ | ||
type | ✔ |
Attribute Name | In CR | In PR | Description |
---|---|---|---|
date of union | ✔ | ||
place of union | ✔ | ||
conjoint1 UIN | ✔ | ||
conjoint2 UIN | ✔ | ||
date of divorce | ✔ |
Attribute Name | In CR | In PR | Description |
---|---|---|---|
parent1 UIN | ✔ | ||
parent2 UIN | ✔ |
Document Type | Description |
---|---|
birth certificate | To be completed |
death certificate | To be completed |
marriage certificate | To be completed |
5.3. UIN Management¶
See UIN Management for the technical details of this interface.
5.3.1. Services¶
-
createUIN
(attributes) Generate a new UIN.
Authorization: To be defined
Parameters: attributes (list[(str,str)]) – A list of pair (attribute name, value) that can be used to allocate a new UIN Returns: a new UIN or an error if the generation is not possible
This service is synchronous.
5.4. Biometrics¶
This interface is described biometric services in the context of an identity system. It is based on the following principles:
- It supports only multi-encounter model, meaning that an identity can have multiple set of biometric data, one for each encounter.
- It does not expose templates (only images) for CRUD services, with one exception to support the use case of documents with biometrics.
- Images can be passed by value or reference. When passed by value, they are base64-encoded.
- Existing standards are used whenever possible, for instance image preferred format is ISO-19794.
Note
Synchronous and Asynchronous Processing
Some services can be very slow depending on the algorithm used, the system workload, etc. Services are described so that:
- If possible, the answer is provided synchronously in the response of the service.
- If not possible for some reason, a status PENDING is returned and the answer, when available, is pushed to a callback provided by the client.
If no callback is provided, this indicates that the client wants a synchronous answer, whatever the time it takes.
If a callback is provided, the server will decide if the processing is done synchronously or asynchronously.
See Biometrics for the technical details of this interface.
5.4.1. Services¶
-
insert
(subjectID, encounterID, galleryID, biographicData, contextualData, biometricData, clientData, callback, options) Insert a new encounter. No identify is performed. This service is synchronous.
Authorization: To be defined
Parameters: - subjectID (str) – The subject ID
- encounterID (str) – The encounter ID. This is optional
- galleryID (list(str)) – the gallery ID to which this encounter belongs
- biographicData (dict) – The biographic data (ex: name, date of birth, gender, etc.)
- contextualData (dict) – The contextual data (ex: encounter date, location, etc.)
- biometricData (list) – the biometric data (images)
- clientData (bytes) – additional data not interpreted by the server but stored as is and returned when encounter data is requested.
- callback – The address of a service to be called when the result is available.
- options (dict) – the processing options. Supported options are
transactionID
,priority
,algorithm
.
Returns: a status indicating success, error, or pending operation. In case of success, the subject ID and the encounter ID are returned. In case of pending operation, the result will be sent later.
-
read
(subjectID, encounterID, callback, options) Retrieve the data of an encounter.
Authorization: To be defined
Parameters: - subjectID (str) – The subject ID
- encounterID (str) – The encounter ID. This is optional. If not provided, all the encounters of the subject are returned.
- callback – The address of a service to be called when the result is available.
- options (dict) – the processing options. Supported options are
transactionID
,priority
.
Returns: a status indicating success, error, or pending operation. In case of success, the encounter data is returned. In case of pending operation, the result will be sent later.
-
update
(subjectID, encounterID, galleryID, biographicData, contextualData, biometricData, callback, options) Update an encounter.
Authorization: To be defined
Parameters: - subjectID (str) – The subject ID
- encounterID (str) – The encounter ID
- galleryID (list(str)) – the gallery ID to which this encounter belongs
- biographicData (dict) – The biographic data (ex: name, date of birth, gender, etc.)
- contextualData (dict) – The contextual data (ex: encounter date, location, etc.)
- biometricData (list) – the biometric data (images)
- clientData (bytes) – additional data not interpreted by the server but stored as is and returned when encounter data is requested.
- callback – The address of a service to be called when the result is available.
- options (dict) – the processing options. Supported options are
transactionID
,priority
,algorithm
.
Returns: a status indicating success, error, or pending operation. In case of success, the subject ID and the encounter ID are returned. In case of pending operation, the result will be sent later.
-
delete
(subjectID, encounterID, callback, options) Delete an encounter.
Authorization: To be defined
Parameters: - subjectID (str) – The subject ID
- encounterID (str) – The encounter ID. This is optional. If not provided, all the encounters of the subject are deleted.
- callback – The address of a service to be called when the result is available.
- options (dict) – the processing options. Supported options are
transactionID
,priority
.
Returns: a status indicating success, error, or pending operation. In case of pending operation, the operation status will be sent later.
-
getTemplate
(subjectID, encounterID, biometricType, biometricSubType, callback, options) Retrieve the data of an encounter.
Authorization: To be defined
Parameters: - subjectID (str) – The subject ID
- encounterID (str) – The encounter ID. This is optional. If not provided, all the encounters of the subject are returned.
- biometricType (str) – The type of biometrics to consider
- biometricSubType (str) – The subtype of biometrics to consider
- callback – The address of a service to be called when the result is available.
- options (dict) – the processing options. Supported options are
transactionID
,priority
.
Returns: a status indicating success, error, or pending operation. In case of success, a list of template data is returned. In case of pending operation, the result will be sent later.
-
identify
(galleryID, filter, biometricData, callback, options) Identify a subject using biometrics data and filters on biographic or contextual data. This may include multiple operations, including manual operations.
Authorization: To be defined
Parameters: - galleryID (str) – Search only in this gallery.
- filter (dict) – The input data (filters and biometric data)
- biometricData – the biometric data.
- callback – The address of a service to be called when the result is available.
- options (dict) – the processing options. Supported options are
transactionID
,priority
,maxNbCand
,threshold
,accuracyLevel
.
Returns: a status indicating success, error, or pending operation. A list of candidates is returned, either synchronously or using the callback.
-
identify
(galleryID, filter, subjectID, callback, options) Identify a subject using biometrics data of a subject existing in the system and filters on biographic or contextual data. This may include multiple operations, including manual operations.
Authorization: To be defined
Parameters: - galleryID (str) – Search only in this gallery.
- filter (dict) – The input data (filters and biometric data)
- subjectID – the subject ID
- callback – The address of a service to be called when the result is available.
- options (dict) – the processing options. Supported options are
transactionID
,priority
,maxNbCand
,threshold
,accuracyLevel
.
Returns: a status indicating success, error, or pending operation. A list of candidates is returned, either synchronously or using the callback.
-
verify
(galleryID, subjectID, biometricData, callback, options) Verify an identity using biometrics data.
Authorization: To be defined
Parameters: - galleryID (str) – Search only in this gallery. If the subject does not belong to this gallery, an error is returned.
- subjectID (str) – The subject ID
- biometricData – The biometric data
- callback – The address of a service to be called when the result is available.
- options (dict) – the processing options. Supported options are
transactionID
,priority
,threshold
,accuracyLevel
.
Returns: a status indicating success, error, or pending operation. A status (boolean) is returned, either synchronously or using the callback. Optionally, details about the matching result can be provided like the score per biometric and per encounter.
-
verify
(biometricData1, biometricData2, callback, options) Verify that two sets of biometrics data correspond to the same subject.
Authorization: To be defined
Parameters: - biometricData1 – The first set of biometric data
- biometricData2 – The second set of biometric data
- callback – The address of a service to be called when the result is available.
- options (dict) – the processing options. Supported options are
transactionID
,priority
,threshold
,accuracyLevel
.
Returns: a status indicating success, error, or pending operation. A status (boolean) is returned, either synchronously or using the callback. Optionally, details about the matching result can be provided like the score per the biometric.
-
getGalleries
(callback, options) Get the ID os all the galleries.
Authorization: To be defined
Parameters: - callback – The address of a service to be called when the result is available.
- options (dict) – the processing options. Supported options are
transactionID
,priority
.
Returns: a status indicating success, error, or pending operation. A list of gallery ID is returned, either synchronously or using the callback.
-
getGalleryContent
(galleryID, callback, options) Get the content of one gallery, i.e. the IDs of all the records linked to this gallery.
Authorization: To be defined
Parameters: - galleryID (str) – Gallery whose content will be returned.
- callback – The address of a service to be called when the result is available.
- options (dict) – the processing options. Supported options are
transactionID
,priority
.
Returns: a status indicating success, error, or pending operation. A list of subjects/encounters is returned, either synchronously or using the callback.
5.4.2. Options¶
Name | Description |
---|---|
transactionID |
A string provided by the client application to identity the request being submitted. It is optional in most cases. When provided, it can be used for tracing and debugging. It is mandatory for asynchronous services and is included in the response pushed asynchronously. |
priority |
Priority of the request. Values range from 0 to 9 |
maxNbCand |
The maximum number of candidates to return. |
threshold |
The threshold to apply on the score to filter the candidates during an identification, authentication or verification. |
algorithm |
Specify the type of algorithm to be used. |
accuracyLevel |
Specify the accuracy expected of the request. This is to support different use cases, when different behavior of the ABIS is expected (response time, accuracy, consolidation/fusion, etc.). |
5.4.3. Data Model¶
Type | Description | Example |
---|---|---|
Gallery | A group of subjects related by a common purpose, designation, or status. A subject can belong to multiple galleries. | TBD |
Subject | Person who is known to an identity assurance system. | TBD |
Encounter | Event in which the client application interacts with a subject resulting in data being collected during or about the encounter. An encounter is characterized by an identifier and a type (also called purpose in some context). | TBD |
Biographic Data | a dictionary (list of names and values) giving the biographic data of interest for the biometric services. | TBD |
Filters | a dictionary (list of names and values or range of values) describing the filters during a search. Filters can apply on biographic data, contextual data or encounter type. | TBD |
Biometric Data | Digital representation of biometric characteristics. As an example, a record containing the image of a finger is a biometric data. All images can be passed by value (image buffer is in the request) or by reference (the address of the image is in the request). All images are compliant with ISO 19794. ISO 19794 allows multiple encoding and supports additional metadata specific to fingerprint, palmprint, portrait or iris. | TBD |
Candidate | Information about a candidate found during an identification | TBD |
CandidateScore | Detailed information about a candidate found during an identification. It includes the score for the biometrics used. | TBD |
Template | A computed buffer corresponding to a biometric and allowing the comparison of biometrics. A template has a format that can be a standard format or a vendor-specific format. | N/A |
5.5. Document Services¶
To be defined
5.6. Third Party Services¶
5.6.1. Services¶
-
verifyIdentity
(UIN[, IDAttribute]) Verify Identity based on UIN and set of Identity Attributes. Attributes can be Biometric data, Civil data or a credential.
Authorization: To be defined
Parameters: - UIN (str) – The person’s UIN
- IDAttribute (list[str]) – A list of list of pair (name,value) requested
Returns: Y or N
In case of error (unknown attributes, unauthorized access, etc.) the value is replaced with an error
-
identify
([inIDAttribute][, outIDAttribute]) Identify a person based on a set of inIDAttribute Identity Attributes. Attributes can be Biometric data, Civil data or a credential. Returns list of identities with attributes specified in outIDAttribute
Authorization: To be defined
Parameters: - inIDAttribute (list[str]) – A list of list of pair (name,value) requested
- outIDAttribute (list[str]) – A list of list of attribute names requested
Returns: Y or N
In case of error (unknown attributes, unauthorized access, etc.) the value is replaced with an error
-
getAttributes
(UIN, names) Retrieve person attributes.
Authorization: To be defined
Parameters: - UIN (str) – The person’s UIN
- names (list[str]) – The names of the attributes requested
Returns: a list of pair (name,value). In case of error (unknown attributes, unauthorized access, etc.) the value is replaced with an error
-
getAttributeSet
(UIN, setName) Retrieve person attributes corresponding to a predefined set name.
Authorization: To be defined
Parameters: - UIN (str) – The person’s UIN
- setName (str) – The name of predefined attributes set name
Returns: a list of pair (name,value). In case of error (unknown attributes, unauthorized access, etc.) the value is replaced with an error